package com.kcwl.carrier.domain.repository;

import com.kcwl.carrier.domain.entity.*;
import com.kcwl.carrier.infrastructure.repository.po.CarrierInfoPO;
import com.kcwl.carrier.interfaces.dto.CooperateEnterpriseDTO;
import com.kcwl.carrier.interfaces.query.CarrierListQuery;
import com.kcwl.ddd.domain.entity.KcPage;
import com.kcwl.ddd.domain.repository.IBaseRepository;

import java.util.List;

/**
 * @author 刘旭超
 * @date 2022年07月11日 16:33
 * @Description
 */
public interface ICarrierInfoRepository extends IBaseRepository<CarrierInfoPO> {
    CarrierInfo queryByUserId(Long userId);

    CarrierInfo queryByCarrierId(Long carrierId);

    int insert(CarrierInfo carrierInfo);

    int updateById(CarrierInfo carrierInfo);

    KcPage<SingleCarrierListInfo> querySingleList(SingleCarrierInfoListCondition condition);

    KcPage<FirmCarrierListInfo> queryFirmList(FirmCarrierInfoListCondition condition);

    List<CarrierInfo> getByIds(List<Long> ids);

    List<CarrierInfo> getCarrierDrivers(Long userId, String keyWord);

    KcPage<CarrierList> getCarrierList(CarrierListQuery query);

    KcPage<CooperateEnterpriseDTO> queryCooperateEnterpriseList(CooperateEnterpriseCondition condition);

    CarrierInfo getCarrierInfo(CarrierInfo carrierInfo);

    List<DriverDispatchInfo> queryDispatchDriverInfo(String mobile);

    List<DriverDispatchInfo> queryDispatchDriverAndVehicleInfo(String queryInfo);

    List<CompanyDispatchInfo> queryDispatchCompanyInfo(String mobile);

    List<CompanyDispatchInfo> queryDispatchCompanyAndAuxiliaryInfo(String mobile);

    List<CompanyDispatchInfo> queryDispatchAuxiliaryInfo(String queryInfo);

    List<CompanyDispatchInfo> queryDispatchCarrierInfo(List<Long> ids);

    List<Long> queryDispatchDriverOrg(Long userId);

    List<CarrierInfo> getCarrierListByParams(CarrierListQuery query);

    KcPage<TmsDriverInfo> queryTmsDriverInfoPage(TmsDriverInfoCondition condition);

    List<CarrierInfo> queryByMobile(List<String> mobileList);

    List<CarrierInfo> queryByName(List<String> nameList);
}
